<ui:composition template="/WEB-INF/templates/main-template.xhtml"
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">

	<ui:define name="sidebar">
	<ui:include src="/WEB-INF/templates/public-sidebar.xhtml" />
	</ui:define>
	<ui:define name="content">
	
	   <!--  <h:panelGroup style="width:100%;text-align:center;">
		 <h:outputText value="Domestic Project Assignment Form" styleClass="outputTextTitle" />
		</h:panelGroup>-->
		<h:form id="formData">
		
		<p:growl id="growl"></p:growl>
		
		<h:panelGrid columns="3" columnClasses="gridCellMiddleLeftAligned, gridCellMiddleRightAligned">
					
			<h:outputLabel value="Select" />
			<h:outputLabel value=":" />		
			<p:menuButton value="#{internationalProjectAssignmentFormBean.selectedButton}">	
			    	
				<p:menuitem value="Create Project Assignment" actionListener="#{internationalProjectAssignmentFormBean.buttonChangeListner}" update="@form"></p:menuitem>
				
				<p:menuitem value="View/Update Assignment" actionListener="#{internationalProjectAssignmentFormBean.buttonChangeListner}" update="@form"></p:menuitem>
			</p:menuButton>		
					
					
					
		</h:panelGrid>
	   
		<!-- CREATE INTERNATIONAL PROJECT ASSIGNMENT FORM -->
         <h:panelGrid  rendered="#{internationalProjectAssignmentFormBean.createInternationalProjectAssignmentForm}" style="width: 100%;">
        <h:outputText value="#{msg['createinternationalprojectassinment.lable.heading']}" styleClass="outputTextTitle" style="font-weight: bold; color: #7892B7"/>
			
			
			<h:panelGrid columns="">
			  
			 <p:panel  header="#{msg['employeedetails.label']}" style="border: 1px solid #d9d9d9; width:100%"> 
			
			<h:panelGrid columns="9" columnClasses="employeeDetail6GridsCell1, gridCellMiddleLeftAligned, employeeDetail6GridsCell2, employeeDetail6GridsCell1" 
					 style="border: 1px solid #d9d9d9; background-color: #FFE4C4;  border: 1px solid #F5AD66; width:100%" cellspacing="3">
				<h:outputLabel value="#{msg['projectassignmentid.lable']}"/>
				<h:outputLabel value=" : " />
				<p:inputText value="#{internationalProjectAssignmentFormBean.internationalProjectAssignmentCode}" readonly="true"/>
				<h:outputLabel value="#{msg['createdate.label']}"/>
				<h:outputLabel value=" : " />
				<p:calendar pattern="dd/MM/yyy" value="#{internationalProjectAssignmentFormBean.createDate}"  showButtonPanel="true"/>	 	
				<h:outputLabel value="#{msg['employeeid.label']}"/>
				<h:outputLabel value=" : " />
				<p:inputText  value="#{internationalProjectAssignmentFormBean.employeeId}"/>
			   
			    <h:outputLabel value="#{msg['employeename.label']}"/>
			    <h:outputLabel value=" : " />
				<p:inputText value="#{internationalProjectAssignmentFormBean.employee.firstName} #{internationalProjectAssignmentFormBean.employee.lastName} "  readonly="true"/>
				<h:outputLabel value="#{msg['contactnumber.label']}"/>
				<h:outputLabel value=" : " />
				<p:inputText value="#{internationalProjectAssignmentFormBean.contactNumber}" readonly="true" />
				<h:outputLabel value="#{msg['emergenceycontactnum.label']}"/>
				<h:outputLabel value=" : " />
				<p:inputMask value="#{internationalProjectAssignmentFormBean.projectAssignment.emergencycontactNumber}" mask="(999) 999-9999"/>
				
				<h:outputLabel value="#{msg['passportnumber.label']}"/>
				<h:outputLabel value=" : " />
				<p:inputText  value="#{internationalProjectAssignmentFormBean.passportNumber}"/>
				<h:outputLabel value="#{msg['approvedby.lable']}"/>
				<h:outputLabel value=" : " />
				<p:inputText value="#{internationalProjectAssignmentFormBean.approvedBy}" readonly="true"/>
				</h:panelGrid>
			    </p:panel>
			    <p:panel header="#{msg['assignmentdetails.label']}" style="border: 1px solid #d9d9d9; width:100%">
			    <h:panelGrid columns="9" columnClasses="employeeDetail6GridsCell1, gridCellMiddleLeftAligned, employeeDetail6GridsCell2, employeeDetail6GridsCell1" 
					 style="width:100%" cellspacing="3">
			
				<h:panelGroup>
					<h:outputLabel value="*" style="color : red;" />
					<h:outputText value="Choose Project" />
					</h:panelGroup>
				 <h:outputLabel value=" : " />
				<p:selectOneMenu value="#{internationalProjectAssignmentFormBean.selectedProjectId}" style="width:160px;">
				<f:selectItem itemLabel="Select a Project " itemValue="" />
				<f:selectItems value="#{internationalProjectAssignmentFormBean.projectsMap}" />
		 		<p:ajax event="change" listener="#{internationalProjectAssignmentFormBean.projectChangeListener}" update="projectName,clientAddress,client,clientLocation,contactPerson,contactNumber,periodFrom,periodTo,recommendedBy"/>
				</p:selectOneMenu>
			<h:outputLabel value="#{msg['recommendedby.lable']}"/>
			<h:outputLabel value=" : " />
			<p:inputText id="recommendedBy" value="#{internationalProjectAssignmentFormBean.selectedProject.owner.firstName} #{internationalProjectAssignmentFormBean.selectedProject.owner.lastName}" readonly="true" />
			<h:outputLabel value="#{msg['projectname.label']}"/>
			<h:outputLabel value=" : " />
			<p:inputText id="projectName" value="#{internationalProjectAssignmentFormBean.selectedProject.projectName}" readonly="true"/>
			
			
			<h:panelGroup>
		<p:spacer></p:spacer>
		<p:spacer></p:spacer>
		<h:outputLabel value="#{msg['clientaddress.label']}"/>
		</h:panelGroup>
			<h:outputLabel value=" : " />
			<p:inputText id="clientAddress" value="#{internationalProjectAssignmentFormBean.selectedProject.clientAddress}" readonly="true" />
			<h:outputLabel value="#{msg['clientname.label']}"/>
			<h:outputLabel value=" : " />
			<p:inputText  id="client" value="#{internationalProjectAssignmentFormBean.selectedProject.client}" readonly="true"/>
			<h:outputLabel value="#{msg['clientlocation.label']}"/>
			<h:outputLabel value=" : " />
			<p:inputText  id="clientLocation" value="#{internationalProjectAssignmentFormBean.selectedProject.clientLocation}" readonly="true"/> 
			
			
			<h:panelGroup>
		<p:spacer></p:spacer>
		<p:spacer></p:spacer>
		<h:outputLabel value="#{msg['clientcontactperson.label']}"/>
		</h:panelGroup>
			<h:outputLabel value=" : " />
			<p:inputText id="contactPerson" value="#{internationalProjectAssignmentFormBean.selectedProject.contactPerson}" readonly="true" />
			<h:outputLabel value="#{msg['clientcontactnumber.lable']}"/>
			<h:outputLabel value=" : " />
			<p:inputText id="contactNumber" value="#{internationalProjectAssignmentFormBean.selectedProject.contactNumber}"  readonly="true"/>
			<h:outputLabel value="#{msg['projectstratdate.label']}"/>
			<h:outputLabel value=" : " />
			<p:calendar id="periodFrom" value="#{internationalProjectAssignmentFormBean.selectedProject.periodFrom}"/>
			
			<h:panelGroup>
		<p:spacer></p:spacer>
		<p:spacer></p:spacer>
		<h:outputLabel value="#{msg['projectenddate.label']}"/>
		</h:panelGroup>
			<h:outputLabel value=" : " />
		    <p:calendar id="periodTo" value="#{internationalProjectAssignmentFormBean.selectedProject.periodTo}"/>
			</h:panelGrid>
		    </p:panel> 
<p:panel header="#{msg['particularsoftravelonwardjourney.label']}" style="border: 1px solid #d9d9d9; width:100%">  
       <h:panelGrid columns="9" id="particularsoftravelonwardjourney" columnClasses="employeeDetail6GridsCell1, gridCellMiddleLeftAligned, employeeDetail6GridsCell2, employeeDetail6GridsCell1" 
					 style="width:100%" cellspacing="3">  
					 <h:panelGroup>
		<h:outputLabel value="*" style="color : red;" />
		<h:outputLabel value="#{msg['modeoftravel.label']}"/>
		</h:panelGroup>
               
			<h:outputLabel value=" : " />
			<p:selectOneMenu value="#{internationalProjectAssignmentFormBean.onwardJourney.modeOfTravel}" style="width:160px;">
			<f:selectItem itemLabel="Choose One" itemValue="Choose One" />
			<f:selectItem itemLabel="Air" itemValue="Air" />
			<f:selectItem itemLabel="Train" itemValue="Train" />
			<f:selectItem itemLabel="Bus" itemValue="Bus" />
			<f:selectItem itemLabel="Taxi" itemValue="Taxi" />
	</p:selectOneMenu>
	 <h:panelGroup>
		<h:outputLabel value="*" style="color : red;" />
		<h:outputLabel value="#{msg['nameofcarrier.label']}"/>
		</h:panelGroup>
	
	<h:outputLabel value=" : " />
	<p:inputText  value="#{internationalProjectAssignmentFormBean.onwardJourney.nameOfCarrier}" />
	
	 <h:panelGroup>
		<h:outputLabel value="*" style="color : red;" />
		<h:outputLabel value="#{msg['carrierid.label']}" />
		</h:panelGroup>
	<h:outputLabel value=" : " />
	<p:inputText  value="#{internationalProjectAssignmentFormBean.onwardJourney.carrierId}" />
	
	 <h:panelGroup>
		<h:outputLabel value="*" style="color : red;" />
		<h:outputLabel value="#{msg['from.label']}"/>
		</h:panelGroup>
	<h:outputLabel value=" : " />
	<p:inputText  value="#{internationalProjectAssignmentFormBean.onwardJourney.source}" />
		 <h:panelGroup>
		<h:outputLabel value="*" style="color : red;" />
		<h:outputLabel value="#{msg['to.label']}"/>

		</h:panelGroup>
	<h:outputLabel value=" : " />
	<p:inputText  value="#{internationalProjectAssignmentFormBean.onwardJourney.destination}" />
	
	 <h:panelGroup>
		<h:outputLabel value="*" style="color : red;" />
		<h:outputLabel value="#{msg['departuredate.label']}"/>

		</h:panelGroup>
	<h:outputLabel value=" : " />
	<p:calendar showButtonPanel="true" pattern="dd/MM/yyy" value="#{internationalProjectAssignmentFormBean.onwardJourney.departureDate}"/>
	 
	  <h:panelGroup>
		<h:outputLabel value="*" style="color : red;" />
		<h:outputLabel value="#{msg['departuretime.label']}"/>

		</h:panelGroup>
	<h:outputLabel value=" : " />
	<p:calendar  pattern="HH:mm" timeOnly="true" value="#{internationalProjectAssignmentFormBean.onwardJourney.departureTime}"/>  
	
	<h:panelGroup>
		<h:outputLabel value="*" style="color : red;" />
	<h:outputLabel value="#{msg['arrivaldate.label']}"/>

		</h:panelGroup>
	<h:outputLabel value=" : " />
	<p:calendar showButtonPanel="true" pattern="dd/MM/yyy" value="#{internationalProjectAssignmentFormBean.onwardJourney.arrivalDate}" />
	
	<h:panelGroup>
		<h:outputLabel value="*" style="color : red;" />
	<h:outputLabel value="#{msg['arrivaltime.label']}"/>

		</h:panelGroup>
	<h:outputLabel value=" : " />
	<p:calendar  pattern="HH:mm" timeOnly="true" value="#{internationalProjectAssignmentFormBean.onwardJourney.arrivalTime}"/>  
           
          <h:panelGrid columns="2">  
            <p:commandButton id="btn_add1" value="Add" action="#{internationalProjectAssignmentFormBean.reinitOnward}" process="@this"  
             update="onwardJourneyDetails growl @parent" ajax="false">
               <p:collector value="#{internationalProjectAssignmentFormBean.onwardJourney}"   
                         addTo="#{internationalProjectAssignmentFormBean.onwardJourneyDetails}" />  
             </p:commandButton>
             <p:commandButton value="Reset" type="reset"/>  
         </h:panelGrid> 
     </h:panelGrid>  
 </p:panel>  
   
 <p:outputPanel id="onward" >  
     <p:dataTable id="onwardJourneyDataTable" value="#{internationalProjectAssignmentFormBean.onwardJourneyDetails}" var="onwardJourney" style="border: 1px solid #d9d9d9; width:100%">  
        <p:column>  
             <f:facet name="header">  
                 <h:outputText value="#{msg['modeoftravel.label']}" />  
             </f:facet>  
             <h:outputText  value="#{onwardJourney.modeOfTravel}" />  
         </p:column>  

         <p:column>  
             <f:facet name="header">  
                 <h:outputText value="#{msg['nameofcarrier.label']}" />  
             </f:facet>  
             <h:outputText value="#{onwardJourney.nameOfCarrier}"  />  
         </p:column>  
   <p:column>  
             <f:facet name="header">  
                 <h:outputText value="#{msg['carrierid.label']}" />  
             </f:facet>  
             <h:outputText value="#{onwardJourney.carrierId}"  />  
         </p:column>  
             <p:column>  
             <f:facet name="header">  
                 <h:outputText value="#{msg['from.label']}" />  
             </f:facet>  
             <h:outputText value="#{onwardJourney.source}"  />  
         </p:column>  
             <p:column>  
             <f:facet name="header">  
                 <h:outputText value="#{msg['to.label']}" />  
             </f:facet>  
             <h:outputText value="#{onwardJourney.destination}"  />  
         </p:column>  
             <p:column>  
             <f:facet name="header">  
                 <h:outputText value="#{msg['departuredate.label']}" />  
             </f:facet>  
             <h:outputText value="#{onwardJourney.departureDate}"  > 
                <f:convertDateTime pattern="dd/MM/yyy" timeZone="#{internationalProjectAssignmentFormBean.defaultTimeZone}"/>
             </h:outputText>   
         </p:column>  
             <p:column>  
             <f:facet name="header">  
                 <h:outputText value="#{msg['departuretime.label']}" />  
             </f:facet>  
             <h:outputText value="#{onwardJourney.departureTime}"  >  
                <f:convertDateTime pattern="HH:mm" timeZone="#{internationalProjectAssignmentFormBean.defaultTimeZone}"/>
             </h:outputText>  
         </p:column>  
             <p:column>  
             <f:facet name="header">  
                 <h:outputText value="#{msg['arrivaldate.label']}" />  
             </f:facet>  
             <h:outputText value="#{onwardJourney.arrivalDate}"  >  
                <f:convertDateTime pattern="dd/MM/yyy" timeZone="#{internationalProjectAssignmentFormBean.defaultTimeZone}"/>
             </h:outputText>  
         </p:column>  
             <p:column>  
             <f:facet name="header">  
                 <h:outputText value="#{msg['arrivaltime.label']}" />  
             </f:facet>  
              <h:outputText value="#{onwardJourney.arrivalTime}"  >
                 <f:convertDateTime pattern="HH:mm" timeZone="#{internationalProjectAssignmentFormBean.defaultTimeZone}"/>
             </h:outputText>  
         </p:column>  
         
         <p:column>  
             <f:facet name="header">  
                 <h:outputText value="Operation" />  
             </f:facet>  
             <p:commandButton icon="ui-icon-close" title="Remove from list" style="padding: 0" action="#{internationalProjectAssignmentFormBean.removeFromOnwardJourneyList}" 
             update=":formData:onward" process=":formData:onward">  
                 <p:collector value="#{onwardJourney}"
                  removeFrom="#{internationalProjectAssignmentFormBean.onwardJourneyDetails}" />  
             </p:commandButton> 
         </p:column>  

     </p:dataTable>  
 </p:outputPanel>  
  <p:panel header="#{msg['particularsoftravelreturnjourney.label']}" style="border: 1px solid #d9d9d9; width:100%">  
     <h:panelGrid columns="9" id="particularsoftravelreturnjourney" columnClasses="employeeDetail6GridsCell1, gridCellMiddleLeftAligned, employeeDetail6GridsCell2, employeeDetail6GridsCell1" 
					 style="width:100%" cellspacing="3">  
            
             <h:panelGroup>
		<h:outputLabel value="*" style="color : red;" />
	 <h:outputLabel value="#{msg['modeoftravel.label']}"/>

		</h:panelGroup>
	<h:outputLabel value=" : " />
	<p:selectOneMenu value="#{internationalProjectAssignmentFormBean.returnJourney.modeOfTravel}" style="width:160px;">
				<f:selectItem itemLabel="Choose One" itemValue="Choose One" />
				<f:selectItem itemLabel="Air" itemValue="Air" />
				<f:selectItem itemLabel="Train" itemValue="Train" />
				<f:selectItem itemLabel="Bus" itemValue="Bus" />
				<f:selectItem itemLabel="Taxi" itemValue="Taxi" />
		</p:selectOneMenu>
		
		
		
             <h:panelGroup>
		<h:outputLabel value="*" style="color : red;" />
	<h:outputLabel value="#{msg['nameofcarrier.label']}"/>

		</h:panelGroup>
		<h:outputLabel value=" : " />
		<p:inputText value="#{internationalProjectAssignmentFormBean.returnJourney.nameOfCarrier}"/>
		
		
             <h:panelGroup>
		<h:outputLabel value="*" style="color : red;" />
	<h:outputLabel value="#{msg['carrierid.label']}"/>

		</h:panelGroup>
		<h:outputLabel value=" : " />
		<p:inputText  value="#{internationalProjectAssignmentFormBean.returnJourney.carrierId}"/>
		
		
             <h:panelGroup>
		<h:outputLabel value="*" style="color : red;" />
	<h:outputLabel value="#{msg['from.label']}"/>

		</h:panelGroup>
		<h:outputLabel value=" : " />
		<p:inputText  value="#{internationalProjectAssignmentFormBean.returnJourney.source}"/>
		
		<h:panelGroup>
		<h:outputLabel value="*" style="color : red;" />
	<h:outputLabel value="#{msg['to.label']}"/>

		</h:panelGroup>
		<h:outputLabel value=" : " />
		<p:inputText  value="#{internationalProjectAssignmentFormBean.returnJourney.destination}"/>
		
		<h:panelGroup>
		<h:outputLabel value="*" style="color : red;" />
<h:outputLabel value="#{msg['departuredate.label']}"/>

		</h:panelGroup>
		<h:outputLabel value=" : " />
		<p:calendar showButtonPanel="true" pattern="dd/MM/yyy" value="#{internationalProjectAssignmentFormBean.returnJourney.departureDate}"/>
		
			<h:panelGroup>
		<h:outputLabel value="*" style="color : red;" />
<h:outputLabel value="#{msg['departuretime.label']}"/>

		</h:panelGroup>
		<h:outputLabel value=" : " />
		<p:calendar  pattern="HH:mm" timeOnly="true" value="#{internationalProjectAssignmentFormBean.returnJourney.departureTime}"/>  
		
			<h:panelGroup>
		<h:outputLabel value="*" style="color : red;" />
<h:outputLabel value="#{msg['arrivaldate.label']}"/>

		</h:panelGroup>
		<h:outputLabel value=" : " />
		<p:calendar showButtonPanel="true" pattern="dd/MM/yyy" value="#{internationalProjectAssignmentFormBean.returnJourney.arrivalDate}" />
		
		<h:panelGroup>
		<h:outputLabel value="*" style="color : red;" />
<h:outputLabel value="#{msg['arrivaltime.label']}"/>

		</h:panelGroup>
		<h:outputLabel value=" : " />
		<p:calendar  pattern="HH:mm" timeOnly="true" value="#{internationalProjectAssignmentFormBean.returnJourney.arrivalTime}" />
            <h:panelGrid columns="2">  
          
          <p:commandButton id="btn_add2" value="Add" action="#{internationalProjectAssignmentFormBean.reinitReturn}"  
              update="returnJourneyDetails growl @parent" ajax="false">
                <p:collector value="#{internationalProjectAssignmentFormBean.returnJourney}"   
                          addTo="#{internationalProjectAssignmentFormBean.returnJourneyDetails}" />  
              </p:commandButton>
              <p:commandButton value="Reset" type="reset"/>  
          </h:panelGrid>  
      </h:panelGrid>  
  </p:panel> 
<p:outputPanel id="return" >  
      <p:dataTable id="returnJourneyDataTable" value="#{internationalProjectAssignmentFormBean.returnJourneyDetails}" var="returnJourney" style="border: 1px solid #d9d9d9; width:100%">  
 
           <p:column>  
              <f:facet name="header">  
                  <h:outputText value="#{msg['modeoftravel.label']}" />  
              </f:facet>  
              <h:outputText  value="#{returnJourney.modeOfTravel}" />  
          </p:column>  

          <p:column>  
              <f:facet name="header">  
                  <h:outputText value="#{msg['nameofcarrier.label']}" />  
              </f:facet>  
              <h:outputText value="#{returnJourney.nameOfCarrier}"  />  
          </p:column>  
    <p:column>  
              <f:facet name="header">  
                  <h:outputText value="#{msg['carrierid.label']}" />  
              </f:facet>  
              <h:outputText value="#{returnJourney.carrierId}"  />  
          </p:column>  
              <p:column>  
              <f:facet name="header">  
                  <h:outputText value="#{msg['from.label']}" />  
              </f:facet>  
              <h:outputText value="#{returnJourney.source}"  />  
          </p:column>  
              <p:column>  
              <f:facet name="header">  
                  <h:outputText value="#{msg['to.label']}" />  
              </f:facet>  
              <h:outputText value="#{returnJourney.destination}"  />  
          </p:column>  
              <p:column>  
              <f:facet name="header">  
                  <h:outputText value="#{msg['departuredate.label']}" />  
              </f:facet>  
              <h:outputText value="#{returnJourney.departureDate}"  >
         <f:convertDateTime pattern="dd/MM/yyy" timeZone="#{internationalProjectAssignmentFormBean.defaultTimeZone}"/>
              </h:outputText>  
          </p:column>  
              <p:column>  
              <f:facet name="header">  
                  <h:outputText value="#{msg['departuretime.label']}" />  
              </f:facet>  
              <h:outputText value="#{returnJourney.departureTime}"  >
                <f:convertDateTime pattern="HH:mm" timeZone="#{internationalProjectAssignmentFormBean.defaultTimeZone}"/>
              </h:outputText>   
          </p:column>  
              <p:column>  
              <f:facet name="header">  
                  <h:outputText value="#{msg['arrivaldate.label']}" />  
              </f:facet>  
              <h:outputText value="#{returnJourney.arrivalDate}" > 
              <f:convertDateTime pattern="dd/MM/yyy" timeZone="#{internationalProjectAssignmentFormBean.defaultTimeZone}"/>
              </h:outputText> 
          </p:column>  
              <p:column>  
              <f:facet name="header">  
                  <h:outputText value="#{msg['arrivaltime.label']}" />  
              </f:facet>  
              <h:outputText value="#{returnJourney.arrivalTime}"  >
               <f:convertDateTime pattern="HH:mm" timeZone="#{internationalProjectAssignmentFormBean.defaultTimeZone}"/>
              </h:outputText>   
          </p:column>  
          
          <p:column>  
              <f:facet name="header">  
                  <h:outputText value="Operation" />  
              </f:facet>  
              <p:commandButton icon="ui-icon-close" title="Remove from list" style="padding: 0" action="#{internationalProjectAssignmentFormBean.removeFromReturnJourneyList}" 
              update=":formData:return" process=":formData:return">  
                  <p:collector value="#{returnJourney}"
                   removeFrom="#{internationalProjectAssignmentFormBean.returnJourneyDetails}" />  
              </p:commandButton> 
          </p:column>  

      </p:dataTable>  
  </p:outputPanel> 
  <p:panel header="#{msg['visadetials.label']}" style="border: 1px solid #d9d9d9; width:100%">
	    <h:panelGrid columns="6" columnClasses="employeeDetail6GridsCell1, gridCellMiddleLeftAligned, employeeDetail6GridsCell2, employeeDetail6GridsCell1" 
					 style="width:100%" cellspacing="3">
	
		<h:panelGroup>
		<h:outputLabel value="*" style="color : red;" />
			<h:outputLabel value="#{msg['visanumber.label']}"/>
		</h:panelGroup>
		<h:outputLabel value=" : " />
		<p:inputText maxlength="20" id="visaNumber" value="#{internationalProjectAssignmentFormBean.visa.VISANumber}" />
		
	
		
		
		<h:panelGroup>
		<h:outputLabel value="*" style="color : red;" />
			<h:outputLabel value="#{msg['validupto.label']}"/>
		</h:panelGroup>
		<h:outputLabel value=" : " />
		<p:calendar pattern="dd/MM/yyy"  showButtonPanel="true" value="#{internationalProjectAssignmentFormBean.visa.validUpto}"/>
		
		
		<h:panelGroup>
		<h:outputLabel value="*" style="color : red;" />
			<h:outputLabel value="#{msg['type.label']}"/>
		</h:panelGroup>
		<h:outputLabel value=" : " />
		<p:inputText value="#{internationalProjectAssignmentFormBean.visa.type}"/>
		
		
		<h:panelGroup>
		<h:outputLabel value="*" style="color : red;" />
			<h:outputLabel value="#{msg['country.label']}"/>
		</h:panelGroup>
		<h:outputLabel value=" : " />
		<p:inputText  value="#{internationalProjectAssignmentFormBean.visa.country}"/>
		</h:panelGrid>
	    </p:panel>
	       <p:panel header="#{msg['insurancedetails.label']}" style="border: 1px solid #d9d9d9; width:100%">
	    <h:panelGrid columns="6" columnClasses="employeeDetail6GridsCell1, gridCellMiddleLeftAligned, employeeDetail6GridsCell2, employeeDetail6GridsCell1" 
					 style="width:100%" cellspacing="3">
		
		<h:panelGroup>
		<h:outputLabel value="*" style="color : red;" />
			<h:outputLabel value="#{msg['provider.label']}"/>
		</h:panelGroup>
		<h:outputLabel value=" : " />
		<p:inputText value="#{internationalProjectAssignmentFormBean.visa.insuranceProvider}"/>
		
		<h:panelGroup>
		<h:outputLabel value="*" style="color : red;" />
			<h:outputLabel value="#{msg['policynumber.label']}"/>
		</h:panelGroup>
		<h:outputLabel value=" : " />
	   <p:inputText maxlength="20" id="insuranceProvider" value="#{internationalProjectAssignmentFormBean.visa.insurancePolicyNumber}" />
		
	
		<h:panelGroup>
		<h:outputLabel value="*" style="color : red;" />
				<h:outputLabel value="#{msg['validityfrom.label']}"/>
		</h:panelGroup>
		<h:outputLabel value=" : " />
		<p:calendar pattern="dd/MM/yyy" showButtonPanel="true" value="#{internationalProjectAssignmentFormBean.visa.validFrom}" />
		
		
			<h:panelGroup>
		<h:outputLabel value="*" style="color : red;" />
				<h:outputLabel value="#{msg['validityto.label']}"/>
		</h:panelGroup>
		<h:outputLabel value=" : " />
		<p:calendar pattern="dd/MM/yyy" showButtonPanel="true" value="#{internationalProjectAssignmentFormBean.visa.validTo}" />
		
	    </h:panelGrid>
	    </p:panel>
              <p:panel header="#{msg['assignmentallowancedetails.label']}" style="border: 1px solid #d9d9d9; width:100%">
	    <h:panelGrid columns="4"  cellspacing="3">
		
		<h:panelGroup>
		<h:outputLabel value="*" style="color : red;" />
			<h:outputLabel value="#{msg['wcccardnumbankaccnum.label']}"/>
		</h:panelGroup>
		<h:outputLabel value=" : " />
		<p:inputText maxlength="20"  id="wccCardNumbankAccNum" value="#{internationalProjectAssignmentFormBean.visa.WCCNumber}" />
		
		<h:inputHidden />
		
		<h:panelGroup>
		<h:outputLabel value="*" style="color : red;" />
			<h:outputLabel value="#{msg['dailyallowance.label']}"/>
		</h:panelGroup>
		<h:outputLabel value=" : " />
		<p:inputMask mask="99999.99" id="dailyAllowance" value="#{internationalProjectAssignmentFormBean.visa.dailyAllowance}"  >
		<f:convertNumber minIntegerDigits="5" minFractionDigits="2" />
        <p:watermark for="dailyAllowance" value="00000.00" />
        </p:inputMask>
     <p:selectOneMenu value="#{internationalProjectAssignmentFormBean.visa.dailyAllowanceCurrency}" style="width:140px;">
    <f:selectItem itemLabel="INR" itemValue="INR" />
	<f:selectItem itemLabel="USD" itemValue="USD" />
	<f:selectItem itemLabel="EURO" itemValue="EURO" />
	</p:selectOneMenu>
	
	<h:panelGroup>
		<h:outputLabel value="*" style="color : red;" />
			<h:outputLabel value="#{msg['loadedtocard.label']}"/>
		</h:panelGroup>
	<h:outputLabel value=" : " />
	<p:inputMask mask="99999.99" id="loadedToCard" value="#{internationalProjectAssignmentFormBean.visa.iodCard}"  >
	<f:convertNumber minIntegerDigits="5" minFractionDigits="2" />
    <p:watermark for="loadedToCard" value="00000.00" />
    </p:inputMask>
	<p:selectOneMenu value="#{internationalProjectAssignmentFormBean.visa.iodCardCurrency}" style="width:140px;">
		    <f:selectItem itemLabel="INR" itemValue="INR" />
			<f:selectItem itemLabel="USD" itemValue="USD" />
			<f:selectItem itemLabel="EURO" itemValue="EURO" />
		</p:selectOneMenu>
	
	<h:panelGroup>
		<h:outputLabel value="*" style="color : red;" />
			<h:outputLabel value="#{msg['cashgivenonhand.label']}"/>
		</h:panelGroup>
	<h:outputLabel value=" : " />
		<p:inputMask mask="99999.99" id="cashGivenOnHand" value="#{internationalProjectAssignmentFormBean.visa.cashGivenInHand}"  >
		<f:convertNumber minIntegerDigits="5" minFractionDigits="2" />
		<p:watermark for="cashGivenOnHand" value="00000.00" />
		</p:inputMask>
             <p:selectOneMenu value="#{internationalProjectAssignmentFormBean.visa.cashGivenInHandCurrency}" style="width:140px;">
	    <f:selectItem itemLabel="INR" itemValue="INR" />
		<f:selectItem itemLabel="USD" itemValue="USD" />
		<f:selectItem itemLabel="EURO" itemValue="EURO" />
	</p:selectOneMenu>
				
				<h:panelGroup>
		<h:outputLabel value="*" style="color : red;" />
		<h:outputLabel value="#{msg['paymentcycle.label']}"/>
		</h:panelGroup>
				<h:outputLabel value=" : " />
				<p:inputText  value="#{internationalProjectAssignmentFormBean.visa.payCycle}"/>
				<h:inputHidden />
				
			    </h:panelGrid>
			    </p:panel>
			    <p:panel header="#{msg['generalinstructions.label']}" style="border: 1px solid #d9d9d9; width:100%">
			    <h:panelGrid columns="1" columnClasses="employeeDetail6GridsCell1, gridCellMiddleLeftAligned, employeeDetail6GridsCell2, employeeDetail6GridsCell1" 
					 style="width:100%" cellspacing="3">
				<h:outputLabel value="1. Timings and holiday calander of the client would be applicable."/>
				<h:outputLabel value="2. Any travel or expenses not related to business will not be reimbursed."/>
				<h:outputLabel value="3. Any travel or expenses should have prior approval of competent authority."/>
				<h:outputLabel value="4. During the assignment your salary will be remitted to your salary account."/>
				<h:outputLabel value="5. During the assignment you will not indulge in any activity of disrepute to either client or to our organization and any such activity/act will attract disciplinary action."/>
				<h:outputLabel value="6. You are not expected to leave the site without written consent of client/project manager."/>
				<h:outputLabel value="7. You will abide to the Employee Confidentiality and Non-disclosure agreement."/>
				<h:outputLabel value="8. Please monitor your allowance payment due date,visa expiry,passport expiry and insurance expiry and inform HR as required."/>
				<h:outputLabel value="9. your escalation point for this assignment would be C.Srinivas Reddy,Center Head,Hyderabad."/>
				<h:outputLabel value="10. Cash given on hand and the currency loaded into the card will be adjusted against the perdiems."/>
				<h:outputLabel value="11. Local conveyance needs supporting bills."/>
				<h:outputLabel value="12. To settle the bills within 7 days of return to the base location."/>
				
				
			    </h:panelGrid>
			    </p:panel>
			     <p:panel header="#{msg['specialinstructions.label']}" style="border: 1px solid #d9d9d9; width:100%">
			    <h:panelGrid columns="2" columnClasses="employeeDetail6GridsCell1, gridCellMiddleLeftAligned, employeeDetail6GridsCell2, employeeDetail6GridsCell1" 
					 style="width:100%" cellspacing="3">
				<h:outputLabel value="#{msg['travelhelp.label']}"/>
				<h:outputLabel value=" : " />
				<h:outputLabel value="#{msg['technicalsupport.label']}"/>
				<h:outputLabel value=" : " />
				
				
				</h:panelGrid>
				<h:panelGrid columns="6" columnClasses="employeeDetail6GridsCell1, gridCellMiddleLeftAligned, employeeDetail6GridsCell2, employeeDetail6GridsCell1" 
					 style="width:100%" cellspacing="3">
				<h:outputLabel value="#{msg['otherhelp.label']}"/>
				<h:outputLabel value=" : " />
				<h:inputHidden />
				<h:inputHidden />
				<h:inputHidden />
				<h:outputLabel value="#{msg['localconveyanceneedssupportingbills.label']}"/>
		         </h:panelGrid>
			    </p:panel>
       </h:panelGrid>
       
   <h:panelGrid columns="1" columnClasses="employeeDetail6GridsCell1, gridCellMiddleLeftAligned, employeeDetail6GridsCell2, employeeDetail6GridsCell1" 
					 style="width:100%" cellspacing="3">
		<h:panelGroup style="float:right;">
		<p:commandButton  type="button" id="submit" value="Submit" onclick="confirmation.show()"  />
        <p:commandButton type="reset" value="Reset" /> 
    	</h:panelGroup> 
    
	
	</h:panelGrid>
	
	<p:confirmDialog widgetVar="confirmation" id="confirmation" severity="alert" message="Do you want to submit your new domestic project assignment?">
			<h:panelGroup style="text-align: right; float: right;">
				<p:commandButton value="Yes, Submit Now" actionListener="#{internationalProjectAssignmentFormBean.saveInternationalProjectAssignmentAction}"  ajax="false" oncomplete="confirmation.hide()"/>
				<p:commandButton id="decline" value="Not Yet" onclick="confirmation.hide()" type="button" />
			</h:panelGroup>
</p:confirmDialog>
				
</h:panelGrid>


 <!-- International projects assignments list -->
        <h:panelGrid rendered="#{internationalProjectAssignmentFormBean.internationalProjectAssignmentsList}">
      <h:outputText value="#{msg['viewupdateinternationalprojectassignment.lable.heading']}" styleClass="outputTextTitle" style="font-weight: bold; color: #7892B7"/>
			<h:panelGrid style="width: 100%; text-align: left; ">
		    <p:scrollPanel style="width: 800px;height:300px"> 
		    	<p:dataTable id="internatioanlProjectAssignmentViewEditTable" style="width: 100%" value="#{internationalProjectAssignmentFormBean.projectAssignmentsList}" var="row"    >
					<p:column>
						<f:facet name="header">
							<h:outputText value="#{msg['projectassignmentid.lable']}" />
						</f:facet>
							<h:outputText value="#{row.projectAssignmentCode}" /> 
					</p:column>
					<p:column>
						<f:facet name="header">
							<h:outputText value="#{msg['projectname.label']}" />
						</f:facet>
						<h:outputText value="#{row.project.projectName}" />
					</p:column>
					<p:column>
						<f:facet name="header">
							<h:outputText value="#{msg['clientname.label']}" />
						</f:facet>
						<h:outputText value="#{row.project.client}" />
					</p:column>
					<p:column>
						<f:facet name="header">
							<h:outputText value="#{msg['clientlocation.label']}" />
						</f:facet>
						<h:outputText value="#{row.project.clientLocation}" />
					</p:column>
					<p:column>
						<f:facet name="header">
							<h:outputText value="#{msg['createdate.label']}" />
						</f:facet>
						<h:outputText value="#{row.createDate}" />
					</p:column>
					<p:column>
						<f:facet name="header">
							<h:outputText value="#{msg['recommenderstatus.lable']}" />
						</f:facet>
						<h:outputText value="#{row.recommendationStatus}" />
					</p:column>
					<p:column>
						<f:facet name="header">
							<h:outputText value="#{msg['approverstatus.lable']}" />
						</f:facet>
						<h:outputText value="#{row.approvalStatus}" />
					</p:column>
					<p:column>
						<f:facet name="header">
							<h:outputText value="Operation" />
						</f:facet>
				
					<p:commandButton value="Edit/View" actionListener="#{internationalProjectAssignmentFormBean.viewProjectAssignmentInEditModeAction}" >
					<f:param id="projectAssignmentId" name="projectAssignmentId" value="#{row.projectAssignmentId}" />
					<f:param id="employeeId" name="employeeId" value="#{internationalProjectAssignmentFormBean.wamUser.employee.employeeId}" />
                    </p:commandButton>					
					</p:column>
					
			</p:dataTable>
			</p:scrollPanel>
			</h:panelGrid>
			
        </h:panelGrid>
      </h:form>
		
	</ui:define>
</ui:composition>

